﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Xiami.util {
    class XVerify {
        /// <summary>
        /// 验证是否是文件夹
        /// </summary>
        /// <param name="dirPath">string量</param>
        /// <returns>Boolean</returns>
        public static Boolean isDir(string dirPath) {
            if(Directory.Exists(dirPath)) {
                return true;
            }

            return false;
        }

        /// <summary>
        /// 检测目录是否以目录分隔标识结束
        /// </summary>
        /// <param name="dirPath"></param>
        /// <returns></returns>
        public static Boolean isValidDirPath(string dirPath) {
            if(dirPath[dirPath.Length - 1]  == Path.DirectorySeparatorChar) {
                return true;
            }

            return false;
        }

    }
}
